﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ListContract.ascx.cs"
    Inherits="Presentation.UserControl.ListContract" %>
<table border="0" cellpadding="0" cellspacing="0" id="content-table" width="100%">
    <tr>
        <th rowspan="3" class="sized">
            <img src="/Content/images/shared/side_shadowleft.jpg" width="20" height="300" alt="" />
        </th>
        <th class="topleft">
        </th>
        <td id="tbl-border-top">
            &nbsp;
        </td>
        <th class="topright">
        </th>
        <th rowspan="3" class="sized">
            <img src="/Content/images/shared/side_shadowright.jpg" width="20" height="300" alt="" />
        </th>
    </tr>
    <tr>
        <td id="tbl-border-left">
        </td>
        <td>
            <!--  start content-table-inner -->
            <div id="content-table-inner">
                <fieldset>
                    <legend id="show-hide">Open/Close Filter</legend>
                    <table width="100%" id="table-filter">
                        <tr>
                            <th style="width: 20%">
                                <asp:CheckBox ID="AllSearchCheckBox" runat="server" Text="Enable filter all" AutoPostBack="True" />
                            </th>
                            <td>
                            </td>
                            <td style="width: 20%">
                            </td>
                            <td style="width: 20%">
                            </td>
                            <td style="width: 40%">
                            </td>
                        </tr>
                        <tr>
                            <th>
                                Contract status:
                            </th>
                            <td>
                                <asp:DropDownList ID="StatusDropDownList" runat="server" AutoPostBack="True" CssClass="styledselect_form_2">
                                    <asp:ListItem Selected="True" Value="0">Blocked</asp:ListItem>
                                    <asp:ListItem Value="1">Actived</asp:ListItem>
                                </asp:DropDownList>
                            </td>
                            <th>
                                Contract type:
                            </th>
                            <td>
                                <asp:DropDownList ID="ContractTypeDropDownList" runat="server" AutoPostBack="True"
                                    CssClass="styledselect_form_2">
                                </asp:DropDownList>
                            </td>
                            <td style="float: right">
                                <asp:Button ID="ShowButton" runat="server" CssClass="form-show" />
                                <asp:Button ID="FilterButton" runat="server" CssClass="form-filter" />
                            </td>
                        </tr>
                    </table>
                </fieldset>
                <table border="0" cellpadding="0" cellspacing="0" width="100%">
                    <tr>
                        <td>
                            <asp:ListView ID="ContractListView" runat="server" OnDataBound="ContractListView_DataBound">
                                <LayoutTemplate>
                                    <table border="0" width="100%" cellpadding="0" cellspacing="0" id="product-table">
                                        <tr>
                                            <th class="table-header-repeat line-left">
                                                <a>Contractor</a>
                                            </th>
                                            <th class="table-header-repeat line-left">
                                                <a>Consultant</a>
                                            </th>
                                            <th class="table-header-repeat line-left">
                                                <a>Client</a>
                                            </th>
                                            <th class="table-header-repeat line-left">
                                                <a>Contract Type</a>
                                            </th>
                                            <th class="table-header-repeat line-left">
                                                <a>Content</a>
                                            </th>
                                            <th class="table-header-repeat line-left">
                                                <a>StartDate</a>
                                            </th>
                                            <th class="table-header-repeat line-left">
                                                <a>EndDate</a>
                                            </th>
                                            <th class="table-header-repeat line-left">
                                                <a>Option</a>
                                            </th>
                                        </tr>
                                        <tbody>
                                            <asp:PlaceHolder ID="itemPlaceHolder" runat="server"></asp:PlaceHolder>
                                        </tbody>
                                    </table>
                                </LayoutTemplate>
                                <ItemTemplate>
                                    <tr>
                                        <td>
                                            <%#Eval("Contractor.User.Username")%>
                                        </td>
                                        <td>
                                            <%#Eval("Consultant.User.Username")%>
                                        </td>
                                        <td>
                                            <%#Eval("Client.User.Username")%>
                                        </td>
                                        <td>
                                            <%#Eval("ContractType.ContractTypeName")%>
                                        </td>
                                        <td>
                                            <%#Eval("Content") %>
                                        </td>
                                        <td>
                                            <%#Eval("StartDate","{0: MM/dd/yyyy}") %>
                                        </td>
                                        <td>
                                            <%#Eval("EndDate","{0: MM/dd/yyyy}")%>
                                        </td>
                                        <td>
                                            <asp:Panel ID="ConsultantPanel" runat="server" Visible="false">
                                                <a class="icon-6" title="Details Contract" href="DetailsContract.aspx?cid=<%# Eval("ContractId")%>">
                                                </a><a class="icon-11" title="View all timesheet of this" href="ViewTimesheets.aspx?cid=<%# Eval("Contractor.ContractorId")%>">
                                                </a>
                                            </asp:Panel>
                                            <asp:Panel ID="AdminPanel" runat="server" Visible="false">
                                                <asp:LinkButton ID="ActiveLink" runat="server" CssClass='<%# (System.Boolean)Eval("IsActive") ? "icon-close" : "icon-open" %>'
                                                    CommandName='<%# (System.Boolean)Eval("IsActive") ? "block" : "active" %>' title='<%# (System.Boolean)Eval("IsActive") ? "Block this contract" : "Active this contract" %>'
                                                    CommandArgument='<%# Eval("ContractId")%>' />
                                                <a class="icon-6" title="Edit this contract" href="UpdateContract.aspx?cid=<%# Eval("ContractId")%>">
                                                </a>
                                            </asp:Panel>
                                        </td>
                                    </tr>
                                </ItemTemplate>
                                <EmptyDataTemplate>
                                    <table border="0" width="100%" cellpadding="0" cellspacing="0" id="product-table">
                                        <tr>
                                            <th class="table-header-repeat line-left">
                                                <a>Contractor</a>
                                            </th>
                                            <th class="table-header-repeat line-left">
                                                <a>Consultant</a>
                                            </th>
                                            <th class="table-header-repeat line-left">
                                                <a>Client</a>
                                            </th>
                                            <th class="table-header-repeat line-left">
                                                <a>Contract Type</a>
                                            </th>
                                            <th class="table-header-repeat line-left">
                                                <a>Content</a>
                                            </th>
                                            <th class="table-header-repeat line-left">
                                                <a>StartDate</a>
                                            </th>
                                            <th class="table-header-repeat line-left">
                                                <a>EndDate</a>
                                            </th>
                                            <th class="table-header-repeat line-left">
                                                <a>Option</a>
                                            </th>
                                        </tr>
                                        <tr>
                                            <td colspan="8">
                                                Nothing to display
                                            </td>
                                        </tr>
                                    </table>
                                </EmptyDataTemplate>
                            </asp:ListView>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:DataPager ID="ContractDataPager" runat="server" PagedControlID="ContractListView"
                                PageSize="10" QueryStringField="page">
                                <Fields>
                                    <asp:NextPreviousPagerField FirstPageImageUrl="~/Content/Images/table/paging_far_left.gif"
                                        PreviousPageImageUrl="~/Content/Images/table/paging_left.gif" ButtonType="Button"
                                        ShowLastPageButton="false" ShowPreviousPageButton="true" ShowNextPageButton="false"
                                        ShowFirstPageButton="true" />
                                    <asp:NumericPagerField ButtonCount="5" CurrentPageLabelCssClass="selected-numeric-box"
                                        NumericButtonCssClass="numeric-box" />
                                    <asp:NextPreviousPagerField LastPageImageUrl="~/Content/Images/table/paging_far_right.gif"
                                        NextPageImageUrl="~/Content/Images/table/paging_right.gif" ButtonType="Button"
                                        ShowFirstPageButton="false" ShowNextPageButton="true" ShowLastPageButton="true"
                                        ShowPreviousPageButton="false" />
                                </Fields>
                            </asp:DataPager>
                        </td>
                    </tr>
                </table>
                <div class="clear">
                </div>
            </div>
            <!--  end content-table-inner  -->
        </td>
        <td id="tbl-border-right">
        </td>
    </tr>
    <tr>
        <th class="sized bottomleft">
        </th>
        <td id="tbl-border-bottom">
            &nbsp;
        </td>
        <th class="sized bottomright">
        </th>
    </tr>
</table>
<div class="clear">
    &nbsp;</div>
